package com.kma.summer2012.client.view;

import com.google.gwt.user.client.ui.DialogBox;
import com.kma.summer2012.client.DialogBoxFactory;

/**
 * Created with IntelliJ IDEA.
 * User: EUGENE
 * Date: 3/13/13
 * Time: 12:54 AM
 * To change this template use File | Settings | File Templates.
 */
public class PopUpPreloader {
    private static DialogBox box;

    public static void show() {
        if (box == null) {
            PreloaderView preloader = new PreloaderView();
            box = DialogBoxFactory.getDialogBoxUncloseable(preloader, "");
        }
        box.show();
    }

    public static void hide() {
        if (box != null)
            box.hide();
    }

    private PopUpPreloader() {
    }
}
